<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
      <div class="gender">
        <label for="">
          <!-- 通过name让他们互斥，但使用v-model时他们也是互斥的可以不绑定name -->
          <!-- 让选中的男或女绑定到data当中 -->
          <!-- 要写value值，不然不知道是什么 -->
          <input id="male" type="radio" name="gender" v-model="gender" value="male">男
        </label>
        <label for="">
          <input id="female" type="radio" name="gender" v-model="gender" value="female">女
        </label>
        <h2>性别：{{gender}}</h2>
      </div>
    </div>

    <script src="./lib/Vue.js"></script>
    <script>
        const app = Vue.createApp({
            data() {
                return{
                  // 默认选择
                  gender:"female"
                }
            }
        })
        app.mount("#app")
    </script>
</body>
</html>